
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Computer Network Lab Manual · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-flexible-alerts/style.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-page-toc-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-auto-scroll-table/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-theme-comscore/test.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="styles/website.css">
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="content/ch01/lab-1.html" />
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter active" data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    Computer Network Lab Manual
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="content/ch01/lab-1.html">
            
                <a href="content/ch01/lab-1.html">
            
                    
                    Lab 1: Switchyard & Mininet
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="content/ch01/prerequisites.html">
            
                <a href="content/ch01/prerequisites.html">
            
                    
                    Task 1: Prerequisites
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1.1" data-path="content/ch01/linux.html">
            
                <a href="content/ch01/linux.html">
            
                    
                    Linux
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.2" data-path="content/ch01/python.html">
            
                <a href="content/ch01/python.html">
            
                    
                    Python
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.3" data-path="content/ch01/git.html">
            
                <a href="content/ch01/git.html">
            
                    
                    Git
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="content/ch01/workflow.html">
            
                <a href="content/ch01/workflow.html">
            
                    
                    Task 2: Workflow
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.2.1" data-path="content/ch01/vscode.html">
            
                <a href="content/ch01/vscode.html">
            
                    
                    VS Code
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.2" data-path="content/ch01/mininet.html">
            
                <a href="content/ch01/mininet.html">
            
                    
                    Mininet
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.3" data-path="content/ch01/wireshark.html">
            
                <a href="content/ch01/wireshark.html">
            
                    
                    Wireshark
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.4" data-path="content/ch01/switchyard.html">
            
                <a href="content/ch01/switchyard.html">
            
                    
                    Switchyard
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="content/ch01/nju-gitlab.html">
            
                <a href="content/ch01/nju-gitlab.html">
            
                    
                    Task 3: NJU GitLab
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="content/ch01/modification.html">
            
                <a href="content/ch01/modification.html">
            
                    
                    Task 4: Modification
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="content/ch02/lab-2.html">
            
                <a href="content/ch02/lab-2.html">
            
                    
                    Lab 2: Learning Switch
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="content/ch02/preparation.html">
            
                <a href="content/ch02/preparation.html">
            
                    
                    Task 1: Preparation
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="content/ch02/basic-switch.html">
            
                <a href="content/ch02/basic-switch.html">
            
                    
                    Task 2: Basic Switch
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="content/ch02/timeouts.html">
            
                <a href="content/ch02/timeouts.html">
            
                    
                    Task 3: Timeouts
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="content/ch02/lru.html">
            
                <a href="content/ch02/lru.html">
            
                    
                    Task 4: Least Recently Used
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="content/ch02/ltv.html">
            
                <a href="content/ch02/ltv.html">
            
                    
                    Task 5: Least Traffic Volume
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="content/ch02/faq.html">
            
                <a href="content/ch02/faq.html">
            
                    
                    FAQ
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="content/ch03/ipv4-router.html">
            
                <a href="content/ch03/ipv4-router.html">
            
                    
                    Lab 3-5: IPv4 Router
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="content/ch03/subch01/lab-3.html">
            
                <a href="content/ch03/subch01/lab-3.html">
            
                    
                    Lab 3: Respond to ARP
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1.1" data-path="content/ch03/subch01/preparation.html">
            
                <a href="content/ch03/subch01/preparation.html">
            
                    
                    Task 1: Preparation
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.2" data-path="content/ch03/subch01/handle-arp-request.html">
            
                <a href="content/ch03/subch01/handle-arp-request.html">
            
                    
                    Task 2: Handle ARP Request
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.3" data-path="content/ch03/subch01/arp-table.html">
            
                <a href="content/ch03/subch01/arp-table.html">
            
                    
                    Task 3: Cached ARP Table
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="content/ch03/faq.html">
            
                <a href="content/ch03/faq.html">
            
                    
                    FAQ
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="appendix/appendix.html">
            
                <a href="appendix/appendix.html">
            
                    
                    Appendix
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="appendix/environment-setup.html">
            
                <a href="appendix/environment-setup.html">
            
                    
                    Environment Setup
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="appendix/about-this-repository.html">
            
                <a href="appendix/about-this-repository.html">
            
                    
                    About This Repository
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >Computer Network Lab Manual</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="computer-network-lab-manual"><a name="computer-network-lab-manual" class="plugin-anchor" href="#computer-network-lab-manual"><i class="fa fa-link" aria-hidden="true"></i></a>Computer Network Lab Manual</h1>
<p>Computer Network, Nanjing University, Spring 2020</p>
<h2 id="course-info"><a name="course-info" class="plugin-anchor" href="#course-info"><i class="fa fa-link" aria-hidden="true"></i></a>Course Info</h2>
<p>Course Number: 22010050</p>
<p>Lecturer: <a href="https://cs.nju.edu.cn/tianchen/" target="_blank">Chen Tian</a> &amp; <a href="https://cs.nju.edu.cn/lwz/" target="_blank">Wenzhong Li</a></p>
<p>Website: <a href="https://cs.nju.edu.cn/lwz/networks-2020/" target="_blank">https://cs.nju.edu.cn/lwz/networks-2020/</a></p>
<h2 id="contact"><a name="contact" class="plugin-anchor" href="#contact"><i class="fa fa-link" aria-hidden="true"></i></a>Contact</h2>
<p>Course QQ group: 940577165</p>
<p>You can find TAs and our &#x6559;&#x5B66;&#x7ACB;&#x65B9; invitation code after joining this group.</p>
<blockquote>
<p>[!TIP]
You may have many questions about our labs. There are some questions can be answered in our manual, some can be answered by searching the Internet, and some we have not mentioned which need to be added to our manual. We welcome the third one because the answers to the first two questions are readily available. To give you faster access to the answers, you need to take a look at this article <a href="https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md" target="_blank">&#x63D0;&#x95EE;&#x7684;&#x667A;&#x6167;</a>.</p>
</blockquote>
<h2 id="lab-assignments"><a name="lab-assignments" class="plugin-anchor" href="#lab-assignments"><i class="fa fa-link" aria-hidden="true"></i></a>Lab Assignments</h2>
<h3 id="lab-1-switchyard--mininet"><a name="lab-1-switchyard--mininet" class="plugin-anchor" href="#lab-1-switchyard--mininet"><i class="fa fa-link" aria-hidden="true"></i></a>Lab 1: Switchyard &amp; Mininet</h3>
<p>Out: 2020-3-4, due 2020-3-18.</p>
<p><a href="content/ch01/lab-1.html">Start the lab here</a></p>
<h3 id="lab-2-learning-switch"><a name="lab-2-learning-switch" class="plugin-anchor" href="#lab-2-learning-switch"><i class="fa fa-link" aria-hidden="true"></i></a>Lab 2: Learning Switch</h3>
<p>Out: 2020-3-11, due 2020-3-25.</p>
<p><a href="content/ch02/lab-2.html">Start the lab here</a></p>
<h3 id="ipv4-router"><a name="ipv4-router" class="plugin-anchor" href="#ipv4-router"><i class="fa fa-link" aria-hidden="true"></i></a>IPv4 Router</h3>
<p><a href="content/ch03/ipv4-router.html">Introduction to Labs 3 to 5</a></p>
<h4 id="lab-3-respond-to-arp"><a name="lab-3-respond-to-arp" class="plugin-anchor" href="#lab-3-respond-to-arp"><i class="fa fa-link" aria-hidden="true"></i></a>Lab 3: Respond to ARP</h4>
<p>Out: 2020-3-25, due 2020-4-8.</p>
<p><a href="content/ch03/subch01/lab-3.html">Start the lab here</a></p>
<h4 id="lab-4-forwarding-packets"><a name="lab-4-forwarding-packets" class="plugin-anchor" href="#lab-4-forwarding-packets"><i class="fa fa-link" aria-hidden="true"></i></a>Lab 4: Forwarding packets</h4>
<p>Out: 2020-4-8, due 2020-4-22.</p>
<h4 id="lab-5-respond-to-icmp"><a name="lab-5-respond-to-icmp" class="plugin-anchor" href="#lab-5-respond-to-icmp"><i class="fa fa-link" aria-hidden="true"></i></a>Lab 5: Respond to ICMP</h4>
<p>Out: 2020-4-22, due 2020-5-6.</p>
<h3 id="reliable-communication"><a name="reliable-communication" class="plugin-anchor" href="#reliable-communication"><i class="fa fa-link" aria-hidden="true"></i></a>Reliable Communication</h3>
<h4 id="lab-6-sender-and-router"><a name="lab-6-sender-and-router" class="plugin-anchor" href="#lab-6-sender-and-router"><i class="fa fa-link" aria-hidden="true"></i></a>Lab 6: Sender and Router</h4>
<p>Out: 2020-5-6, due 2020-5-20.</p>
<h4 id="lab-7-receiver"><a name="lab-7-receiver" class="plugin-anchor" href="#lab-7-receiver"><i class="fa fa-link" aria-hidden="true"></i></a>Lab 7: Receiver</h4>
<p>Out: 2020-5-20, due 2020-6-3.</p>
<h2 id="policies"><a name="policies" class="plugin-anchor" href="#policies"><i class="fa fa-link" aria-hidden="true"></i></a>Policies</h2>
<p>We encourage discussions with others to clarify questions about homework problems and programming assignment problem statements. However</p>
<blockquote>
<p>[!DANGER|style:flat]</p>
<ol>
<li>Programming solutions must be your own.</li>
<li>Do not make your remote assignment repository public.</li>
</ol>
</blockquote>

<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                
                <a href="content/ch01/lab-1.html" class="navigation navigation-next navigation-unique" aria-label="Next page: Lab 1: Switchyard & Mininet">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Computer Network Lab Manual","level":"1.1","depth":1,"next":{"title":"Lab 1: Switchyard & Mininet","level":"1.2","depth":1,"path":"content/ch01/lab-1.md","ref":"content/ch01/lab-1.md","articles":[{"title":"Task 1: Prerequisites","level":"1.2.1","depth":2,"path":"content/ch01/prerequisites.md","ref":"content/ch01/prerequisites.md","articles":[{"title":"Linux","level":"1.2.1.1","depth":3,"path":"content/ch01/linux.md","ref":"content/ch01/linux.md","articles":[]},{"title":"Python","level":"1.2.1.2","depth":3,"path":"content/ch01/python.md","ref":"content/ch01/python.md","articles":[]},{"title":"Git","level":"1.2.1.3","depth":3,"path":"content/ch01/git.md","ref":"content/ch01/git.md","articles":[]}]},{"title":"Task 2: Workflow","level":"1.2.2","depth":2,"path":"content/ch01/workflow.md","ref":"content/ch01/workflow.md","articles":[{"title":"VS Code","level":"1.2.2.1","depth":3,"path":"content/ch01/vscode.md","ref":"content/ch01/vscode.md","articles":[]},{"title":"Mininet","level":"1.2.2.2","depth":3,"path":"content/ch01/mininet.md","ref":"content/ch01/mininet.md","articles":[]},{"title":"Wireshark","level":"1.2.2.3","depth":3,"path":"content/ch01/wireshark.md","ref":"content/ch01/wireshark.md","articles":[]},{"title":"Switchyard","level":"1.2.2.4","depth":3,"path":"content/ch01/switchyard.md","ref":"content/ch01/switchyard.md","articles":[]}]},{"title":"Task 3: NJU GitLab","level":"1.2.3","depth":2,"path":"content/ch01/nju-gitlab.md","ref":"content/ch01/nju-gitlab.md","articles":[]},{"title":"Task 4: Modification","level":"1.2.4","depth":2,"path":"content/ch01/modification.md","ref":"content/ch01/modification.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["theme-comscore","back-to-top-button","-lunr","-search","search-pro","github","splitter","flexible-alerts","page-toc-button","auto-scroll-table","popup","anchors"],"pluginsConfig":{"styles":{"website":"styles/website.css"},"github":{"url":"https://github.com/shellqiqi/nju-network-experiments"},"splitter":{},"search-pro":{},"auto-scroll-table":{},"popup":{},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-comscore":{},"page-toc-button":{},"back-to-top-button":{},"flexible-alerts":{"danger":{"className":"danger","icon":"fa fa-ban","label":"Attention"},"note":{"className":"info","icon":"fa fa-info-circle","label":"Note"},"style":"callout","tip":{"className":"tip","icon":"fa fa-lightbulb-o","label":"Tip"},"warning":{"className":"warning","icon":"fa fa-exclamation-triangle","label":"Warning"}},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"README.md","mtime":"2020-03-24T11:10:36.696Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-03-24T13:21:20.286Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-flexible-alerts/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-page-toc-button/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-auto-scroll-table/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-theme-comscore/test.js"></script>
        
    

    </body>
</html>

